import { get, post, post_json } from '@/http/axios'
export default {
    namespaced: true,
    state: {
        // 产品数据
        productData:[],
    },
    mutations: {
        SET_PRODUCTDATA(state,payload){
            state.productData = payload;
        },
    },
    actions: {
        // 获取产品数据
        async getAllProductData({commit},payload)
        {
            const res = await get('/product/pageQuery',payload)
            commit('SET_PRODUCTDATA',res.data.data.list)
        }
    }
}